package com.iter.devbox.pattern.flyweight;

/**具体享元角色类*/
public class ConcreteFlyweight implements Flyweight {

	/**内部自己的状态*/
	private String state = null;
	
	/**构造方法，内部状态作为参数传入*/
    public ConcreteFlyweight(String state){
        this.state = state;
    }
    
    /**一个具体操作，state是外部状态*/
	@Override
	public void operation(String state) {
		System.out.println("内部状态:" + this.state);
        System.out.println("外部状态：" + state);
	}
}